Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(X)) → 2ND(mark(X))
FROM(mark(X)) → FROM(X)
TAKE(X1, active(X2)) → TAKE(X1, X2)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
FROM(active(X)) → FROM(X)
CONS(X1, mark(X2)) → CONS(X1, X2)
2ND(mark(X)) → 2ND(X)
HEAD(mark(X)) → HEAD(X)
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → HEAD(XS)
MARK(take(X1, X2)) → MARK(X1)
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(take(X1, X2)) → TAKE(mark(X1), mark(X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(head(X)) → HEAD(mark(X))
MARK(sel(X1, X2)) → MARK(X1)
S(active(X)) → S(X)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
ACTIVE(take(0, XS)) → MARK(nil)
TAKE(active(X1), X2) → TAKE(X1, X2)
HEAD(active(X)) → HEAD(X)
ACTIVE(take(s(N), cons(X, XS))) → TAKE(N, XS)
TAKE(mark(X1), X2) → TAKE(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
2ND(active(X)) → 2ND(X)
ACTIVE(from(X)) → FROM(s(X))
SEL(mark(X1), X2) → SEL(X1, X2)
MARK(take(X1, X2)) → MARK(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
SEL(X1, active(X2)) → SEL(X1, X2)
MARK(s(X)) → MARK(X)
MARK(from(X)) → FROM(mark(X))
CONS(X1, active(X2)) → CONS(X1, X2)
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(s(X)) → ACTIVE(s(mark(X)))
SEL(X1, mark(X2)) → SEL(X1, X2)
SEL(active(X1), X2) → SEL(X1, X2)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(s(X)) → S(mark(X))
MARK(from(X)) → MARK(X)
S(mark(X)) → S(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(take(s(N), cons(X, XS))) → CONS(X, take(N, XS))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
TAKE(X1, mark(X2)) → TAKE(X1, X2)
ACTIVE(from(X)) → S(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(X1, X2)) → SEL(mark(X1), mark(X2))
MARK(0) → ACTIVE(0)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
ACTIVE(sel(s(N), cons(X, XS))) → SEL(N, XS)
MARK(nil) → ACTIVE(nil)
ACTIVE(from(X)) → CONS(X, from(s(X)))
MARK(sel(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(X)) → 2ND(mark(X))
FROM(mark(X)) → FROM(X)
TAKE(X1, active(X2)) → TAKE(X1, X2)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
FROM(active(X)) → FROM(X)
CONS(X1, mark(X2)) → CONS(X1, X2)
2ND(mark(X)) → 2ND(X)
HEAD(mark(X)) → HEAD(X)
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → HEAD(XS)
MARK(take(X1, X2)) → MARK(X1)
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(take(X1, X2)) → TAKE(mark(X1), mark(X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(head(X)) → HEAD(mark(X))
MARK(sel(X1, X2)) → MARK(X1)
S(active(X)) → S(X)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
ACTIVE(take(0, XS)) → MARK(nil)
TAKE(active(X1), X2) → TAKE(X1, X2)
HEAD(active(X)) → HEAD(X)
ACTIVE(take(s(N), cons(X, XS))) → TAKE(N, XS)
TAKE(mark(X1), X2) → TAKE(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
2ND(active(X)) → 2ND(X)
ACTIVE(from(X)) → FROM(s(X))
SEL(mark(X1), X2) → SEL(X1, X2)
MARK(take(X1, X2)) → MARK(X2)
CONS(mark(X1), X2) → CONS(X1, X2)
SEL(X1, active(X2)) → SEL(X1, X2)
MARK(s(X)) → MARK(X)
MARK(from(X)) → FROM(mark(X))
CONS(X1, active(X2)) → CONS(X1, X2)
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(s(X)) → ACTIVE(s(mark(X)))
SEL(X1, mark(X2)) → SEL(X1, X2)
SEL(active(X1), X2) → SEL(X1, X2)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(s(X)) → S(mark(X))
MARK(from(X)) → MARK(X)
S(mark(X)) → S(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(take(s(N), cons(X, XS))) → CONS(X, take(N, XS))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
TAKE(X1, mark(X2)) → TAKE(X1, X2)
ACTIVE(from(X)) → S(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(X1, X2)) → SEL(mark(X1), mark(X2))
MARK(0) → ACTIVE(0)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
ACTIVE(sel(s(N), cons(X, XS))) → SEL(N, XS)
MARK(nil) → ACTIVE(nil)
ACTIVE(from(X)) → CONS(X, from(s(X)))
MARK(sel(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 8 SCCs with 17 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(X1, active(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)
SEL(active(X1), X2) → SEL(X1, X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(X1, active(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)
SEL(active(X1), X2) → SEL(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(X1, active(X2)) → TAKE(X1, X2)
TAKE(active(X1), X2) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(X1, active(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(active(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

2ND(active(X)) → 2ND(X)
2ND(mark(X)) → 2ND(X)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

2ND(active(X)) → 2ND(X)
2ND(mark(X)) → 2ND(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(take(X1, X2)) → MARK(X2)
MARK(sel(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(take(X1, X2)) → MARK(X1)
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.

MARK(take(X1, X2)) → MARK(X2)
MARK(sel(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(take(X1, X2)) → MARK(X1)
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(2nd(x1)) = 1   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(from(x1)) = 1   
POL(head(x1)) = 1   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1   
POL(take(x1, x2)) = 1   

The following usable rules [17] were oriented:

2nd(active(X)) → 2nd(X)
2nd(mark(X)) → 2nd(X)
head(active(X)) → head(X)
head(mark(X)) → head(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
sel(X1, mark(X2)) → sel(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(mark(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(X1, X2)) → MARK(X2)
MARK(sel(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(take(X1, X2)) → MARK(X1)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(head(X)) → ACTIVE(head(mark(X))) at position [0] we obtained the following new rules:

MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
QDP
                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(X1, X2)) → MARK(X2)
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(s(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(take(X1, X2)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2)))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(sel(X1, X2)) → ACTIVE(sel(mark(X1), mark(X2))) at position [0] we obtained the following new rules:

MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(s(X)) → MARK(X)
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2)))
MARK(from(X)) → MARK(X)
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(take(X1, X2)) → ACTIVE(take(mark(X1), mark(X2))) at position [0] we obtained the following new rules:

MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(s(X)) → MARK(X)
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(2nd(X)) → ACTIVE(2nd(mark(X))) at position [0] we obtained the following new rules:

MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(from(X)) → MARK(X)
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(head(0)) → ACTIVE(head(active(0))) at position [0] we obtained the following new rules:

MARK(head(0)) → ACTIVE(head(0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(head(0)) → ACTIVE(head(0))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(head(nil)) → ACTIVE(head(active(nil)))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(from(X)) → MARK(X)
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(head(nil)) → ACTIVE(head(active(nil))) at position [0] we obtained the following new rules:

MARK(head(nil)) → ACTIVE(head(nil))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(head(nil)) → ACTIVE(head(nil))
MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(2nd(nil)) → ACTIVE(2nd(active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(2nd(nil)) → ACTIVE(2nd(active(nil))) at position [0] we obtained the following new rules:

MARK(2nd(nil)) → ACTIVE(2nd(nil))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Narrowing
QDP
                                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(nil)) → ACTIVE(2nd(nil))
MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
QDP
                                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(2nd(0)) → ACTIVE(2nd(active(0)))
MARK(sel(X1, X2)) → MARK(X1)
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(2nd(X)) → MARK(X)
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(2nd(0)) → ACTIVE(2nd(active(0))) at position [0] we obtained the following new rules:

MARK(2nd(0)) → ACTIVE(2nd(0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ Narrowing
QDP
                                                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(2nd(0)) → ACTIVE(2nd(0))
MARK(sel(X1, X2)) → MARK(X1)
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(sel(X1, X2)) → MARK(X2)
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ Narrowing
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
QDP

Q DP problem:
The TRS P consists of the following rules:

MARK(take(y0, 2nd(x0))) → ACTIVE(take(mark(y0), active(2nd(mark(x0)))))
MARK(take(x0, y1)) → ACTIVE(take(x0, mark(y1)))
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(2nd(cons(x0, x1))) → ACTIVE(2nd(active(cons(mark(x0), x1))))
ACTIVE(sel(s(N), cons(X, XS))) → MARK(sel(N, XS))
MARK(sel(y0, from(x0))) → ACTIVE(sel(mark(y0), active(from(mark(x0)))))
MARK(sel(y0, cons(x0, x1))) → ACTIVE(sel(mark(y0), active(cons(mark(x0), x1))))
MARK(2nd(sel(x0, x1))) → ACTIVE(2nd(active(sel(mark(x0), mark(x1)))))
MARK(take(X1, X2)) → MARK(X1)
MARK(sel(y0, take(x0, x1))) → ACTIVE(sel(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
ACTIVE(sel(0, cons(X, XS))) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sel(y0, s(x0))) → ACTIVE(sel(mark(y0), active(s(mark(x0)))))
MARK(sel(X1, X2)) → MARK(X1)
MARK(2nd(head(x0))) → ACTIVE(2nd(active(head(mark(x0)))))
MARK(take(0, y1)) → ACTIVE(take(active(0), mark(y1)))
MARK(take(y0, 0)) → ACTIVE(take(mark(y0), active(0)))
MARK(take(head(x0), y1)) → ACTIVE(take(active(head(mark(x0))), mark(y1)))
MARK(sel(take(x0, x1), y1)) → ACTIVE(sel(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(take(y0, take(x0, x1))) → ACTIVE(take(mark(y0), active(take(mark(x0), mark(x1)))))
MARK(2nd(2nd(x0))) → ACTIVE(2nd(active(2nd(mark(x0)))))
MARK(take(y0, from(x0))) → ACTIVE(take(mark(y0), active(from(mark(x0)))))
MARK(take(take(x0, x1), y1)) → ACTIVE(take(active(take(mark(x0), mark(x1))), mark(y1)))
MARK(sel(from(x0), y1)) → ACTIVE(sel(active(from(mark(x0))), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(take(y0, head(x0))) → ACTIVE(take(mark(y0), active(head(mark(x0)))))
MARK(sel(head(x0), y1)) → ACTIVE(sel(active(head(mark(x0))), mark(y1)))
MARK(2nd(from(x0))) → ACTIVE(2nd(active(from(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(sel(y0, sel(x0, x1))) → ACTIVE(sel(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, head(x0))) → ACTIVE(sel(mark(y0), active(head(mark(x0)))))
MARK(take(X1, X2)) → MARK(X2)
MARK(2nd(x0)) → ACTIVE(2nd(x0))
MARK(head(2nd(x0))) → ACTIVE(head(active(2nd(mark(x0)))))
MARK(take(from(x0), y1)) → ACTIVE(take(active(from(mark(x0))), mark(y1)))
MARK(take(sel(x0, x1), y1)) → ACTIVE(take(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(s(X)) → MARK(X)
MARK(2nd(s(x0))) → ACTIVE(2nd(active(s(mark(x0)))))
MARK(take(y0, x1)) → ACTIVE(take(mark(y0), x1))
MARK(take(s(x0), y1)) → ACTIVE(take(active(s(mark(x0))), mark(y1)))
MARK(sel(cons(x0, x1), y1)) → ACTIVE(sel(active(cons(mark(x0), x1)), mark(y1)))
MARK(take(y0, sel(x0, x1))) → ACTIVE(take(mark(y0), active(sel(mark(x0), mark(x1)))))
MARK(sel(y0, x1)) → ACTIVE(sel(mark(y0), x1))
ACTIVE(2nd(cons(X, XS))) → MARK(head(XS))
MARK(2nd(take(x0, x1))) → ACTIVE(2nd(active(take(mark(x0), mark(x1)))))
MARK(sel(y0, 0)) → ACTIVE(sel(mark(y0), active(0)))
MARK(sel(0, y1)) → ACTIVE(sel(active(0), mark(y1)))
MARK(take(nil, y1)) → ACTIVE(take(active(nil), mark(y1)))
MARK(take(y0, nil)) → ACTIVE(take(mark(y0), active(nil)))
MARK(sel(sel(x0, x1), y1)) → ACTIVE(sel(active(sel(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(take(cons(x0, x1), y1)) → ACTIVE(take(active(cons(mark(x0), x1)), mark(y1)))
MARK(head(sel(x0, x1))) → ACTIVE(head(active(sel(mark(x0), mark(x1)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(take(y0, s(x0))) → ACTIVE(take(mark(y0), active(s(mark(x0)))))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(take(2nd(x0), y1)) → ACTIVE(take(active(2nd(mark(x0))), mark(y1)))
MARK(take(y0, cons(x0, x1))) → ACTIVE(take(mark(y0), active(cons(mark(x0), x1))))
MARK(sel(x0, y1)) → ACTIVE(sel(x0, mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sel(2nd(x0), y1)) → ACTIVE(sel(active(2nd(mark(x0))), mark(y1)))
ACTIVE(head(cons(X, XS))) → MARK(X)
MARK(2nd(X)) → MARK(X)
MARK(sel(y0, nil)) → ACTIVE(sel(mark(y0), active(nil)))
MARK(sel(nil, y1)) → ACTIVE(sel(active(nil), mark(y1)))
MARK(sel(y0, 2nd(x0))) → ACTIVE(sel(mark(y0), active(2nd(mark(x0)))))
ACTIVE(take(s(N), cons(X, XS))) → MARK(cons(X, take(N, XS)))
MARK(head(take(x0, x1))) → ACTIVE(head(active(take(mark(x0), mark(x1)))))
MARK(sel(X1, X2)) → MARK(X2)
MARK(sel(s(x0), y1)) → ACTIVE(sel(active(s(mark(x0))), mark(y1)))

The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, XS))) → mark(X)
active(2nd(cons(X, XS))) → mark(head(XS))
active(take(0, XS)) → mark(nil)
active(take(s(N), cons(X, XS))) → mark(cons(X, take(N, XS)))
active(sel(0, cons(X, XS))) → mark(X)
active(sel(s(N), cons(X, XS))) → mark(sel(N, XS))
mark(from(X)) → active(from(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(2nd(X)) → active(2nd(mark(X)))
mark(take(X1, X2)) → active(take(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(sel(X1, X2)) → active(sel(mark(X1), mark(X2)))
from(mark(X)) → from(X)
from(active(X)) → from(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
take(mark(X1), X2) → take(X1, X2)
take(X1, mark(X2)) → take(X1, X2)
take(active(X1), X2) → take(X1, X2)
take(X1, active(X2)) → take(X1, X2)
sel(mark(X1), X2) → sel(X1, X2)
sel(X1, mark(X2)) → sel(X1, X2)
sel(active(X1), X2) → sel(X1, X2)
sel(X1, active(X2)) → sel(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.